import Frame from '@/frame/frame.vue'

import Merber from './merber.js'
import Activity from './activity.js'
import PersonalCenter from './personal_center.js'
import Product from './product.js'
/**
 * @description
 * path: 路径（必填）
 * name: 名称，用于国际化、面包屑、以及菜单等（必填）
 * component: 组件（必填）
 * meta: {...}
 */

export default [
  // {
  //   path: '/login',
  //   name: '登录',
  //   meta: {},
  //   component: () => import('@/views/login.vue')
  // },
  {
    path: '/',
    redirect: '/home'
  },
  // {
  //   path: '/game',
  //   name: 'vip',
  //   meta: {},
  //   component: () => import('@/views/game.vue')
  // },
  // {
  //   path: '/home',
  //   name: '首页',
  //   meta: {},
  //   component: () => import('@/views/home.vue')
  // },
  // 会员
  Merber,
  Activity,
  PersonalCenter,
  Product,
  // 首页
  {
    path: '/main',
    name: '首页-主页',
    component: Frame,
    children: [
      {
        path: 'index',
        name: 'vip',
        meta: {},
        component: () => import('@/views/main/index.vue')
      },
      {
        path: 'parcel',
        name: '运费优惠',
        meta: {},
        component: () => import('@/views/main/parcel.vue')
      },
      {
        path: 'giftbagDetails',
        name: '分享大礼包',
        meta: {},
        component: () => import('@/views/main/giftbagDetails.vue')
      },
      {
        path: 'giftbagDetails1',
        name: '分享大礼包',
        meta: {},
        component: () => import('@/views/main/giftbagDetails1.vue')
      },
      {
        path: 'shopDetails',
        name: '详情',
        meta: {},
        component: () => import('@/views/main/shopDetails.vue')
      },
      {
        path: 'shopOrder',
        name: '确认订单',
        meta: {},
        component: () => import('@/views/main/shop_buy/shop_order.vue')
      },
      {
        path: 'shopIspay',
        name: '确认支付',
        meta: {},
        component: () => import('@/views/main/shop_buy/shop_ispay.vue')
      },
      {
        path: 'cate',
        name: '分类',
        meta: {},
        component: () => import('@/views/main/cate.vue')
      }
    ]
  },
  {
    path: '/pact',
    name: '协议-主页',
    component: Frame,
    children: [
      {
        path: 'gvrp',
        name: '美家美货注册服务协议',
        meta: {},
        component: () => import('@/views/pact/gvrp.vue')
      },
      {
        path: 'invitation',
        name: '邀请码如何获得',
        meta: {},
        component: () => import('@/views/pact/invitation.vue')
      },
      {
        path: 'privacy',
        name: '美家美货用户隐私协议',
        meta: {},
        component: () => import('@/views/pact/privacy.vue')
      },
      {
        path: 'collaborate',
        name: '共享经济合作伙伴协议',
        meta: {},
        component: () => import('@/views/pact/collaborate.vue')
      }
    ]
  },
  {
    path: '/login',
    name: '登录注册',
    component: Frame,
    children: [
      {
        path: '/',
        name: '登录',
        meta: {},
        component: () => import('@/views/login/login.vue')
      },
      {
        path: 'tel_login',
        name: '手机号登录',
        meta: {},
        component: () => import('@/views/login/tel_login.vue')
      }
    ]
  },
  // 个人中心
  {
    path: '/personal_center',
    name: '个人中心',
    component: Frame,
    children: [
      {
        path: 'index',
        name: '个人中心-主页',
        meta: {},
        component: () => import('@/views/personal_center/index.vue')
      },
      {
        path: 'logisticsDetails',
        name: '物流详情',
        meta: {},
        component: () => import('@/views/personal_center/logisticsDetails.vue')
      }
    ]
  }
  // // 异常
  // {
  //   path: '*',
  //   redirect: '/error',
  //   meta: {}
  // }, // 没找到页面
  // {
  //   path: '/error',
  //   name: '错误',
  //   meta: {},
  //   component: () => import('@/views/common/error.vue')
  // }
]
